'use strict'


import request from '@/utils/request'

export function list(parameter) {
  return request({
    url: '/EquEquipment/GetPageData',
    method: 'get',
    params: parameter
  })
}

export function getEquEquipmentList(parameter) {
  return request({
    url: '/EquEquipment/GetPageData',
    method: 'get',
    params: parameter
  })
}


export function getEquDetail(parameter) {
  return request({
    url: '/EquEquipment/GetDetailEquipment',
    method: 'get',
    params: parameter
  })
}

export function checkList(parameter) {
  return request({
    url: '/EquEquipment/GetEquCheckPageData',
    method: 'get',
    params: parameter
  })
}
// 新增设备安全附件
export function saveSafeFile(data) {
  return request({
    url: '/EquEquipment/AddEquSafeFile',
    method: 'post',
    data
  })
}
// 获取码值
export function getDistList(parameter) {
  return request({
    url: '/EquEquipment/InitEntity',
    method: 'get',
    params: parameter
  })
}

// 获取码值
export function getDetail(parameter) {
  return request({
    url: '/EquEquipment/GetDetailEquipment',
    method: 'get',
    params: parameter
  })
}

// 获取设备安全附件
export function getSafeFileList(parameter) {
  return request({
    url: '/EquEquipment/GetSafeFilePageData',
    method: 'get',
    params: parameter
  })
}


// 编辑检查历史
export function edit(data) {
  return request({
    url: `/EquEquipment/EditCheckEquipmen`,
    method: 'post',
    data
  })
}

// 编辑设备设施
export function editSubmit(data) {
  return request({
    url: `/EquEquipment/EditEquipmen`,
    method: 'post',
    data
  })
}

// 编辑设备设施
export function addRecord(data) {
  return request({
    url: `/EquEquipment/EditCheckEquipmenSafeFile`,
    method: 'post',
    data
  })
}

// 编辑设备设施
export function editCheck(data) {
  return request({
    url: `/EquEquipment/EditCheckEquipmenSafeFile`,
    method: 'post',
    data
  })
}



export function initDateList(parameter) {
  return request({
    url: '/EquEquipment/InitEquSafeFileCheckEntity',
    method: 'get',
    params: parameter
  })
}



export function checkDeleta(parameter) {
  return request({
    url: '/EquEquipment/DeleteCheckEquipmen',
    method: 'get',
    params: parameter
  })
}

export function fileDelete(parameter) {
  return request({
    url: '/EquEquipment/DeleteEquSafeFile',
    method: 'get',
    params: parameter
  })
}



export function getSafeList(parameter) {
  return request({
    url: '/EquEquipment/GetEquipmentSafeFile',
    method: 'get',
    params: parameter
  })
}


export function getDateList(parameter) {
  return request({
    url: '/EquEquipment/InitCheckEntity',
    method: 'get',
    params: parameter
  })
}



export function fileCheckDelete(parameter) {
  return request({
    url: '/EquEquipment/DeleteCheckEquipmenSafeFile',
    method: 'get',
    params: parameter
  })
}

export function getSafeEquipFileList(parameter) {
  return request({
    url: '/EquEquipment/GetEquipmentSafeFileFile',
    method: 'get',
    params: parameter
  })
}



// 编辑设备设施
export function fileCheckEquipDelete(data) {
  return request({
    url: `/EquEquipment/DeleteEquipmentSafeFileFile`,
    method: 'post',
    data
  })
}

// 上传设备安全附件add
export function saveSafeEquipFile(data) {
  return request({
    url: `/EquEquipment/AddEquipmentSafeFileFile`,
    method: 'post',
    data
  })
}


export function getFileTypes(parameter) {
  return request({
    url: '/EquEquipment/GetFileTypes',
    method: 'get',
    params: parameter
  })
}
// 设备检查表
export function getEquDangerTemp(parameter) {
  return request({
    url: '/EquDangerTemp/GetPageData',
    method: 'get',
    params: parameter
  })
}
//添加检查表 EquDangerTemp/AddTemplateToEquDanger

export function AddTemplateToEquDanger(data) {
  return request({
    url: `/EquDangerTemp/AddTemplateToEquDanger`,
    method: 'post',
    data
  })
}
// 初始化数据
export function initData(parameter) {
  return request({
    url: '/EquEquipment/InitEntity?parentId=MyList',
    method: 'get',
    params: parameter
  })
}


// 设备类别 EquEquipment/GetEquipmentTypeParams
export function getEquipmentTypeParams(parameter) {
  return request({
    url: '/EquEquipment/GetEquipmentTypeParams',
    method: 'get',
    params: parameter
  })
}


